<template>
  <div class="payother">
    <img src="../../assets/images/zfb_icon.png" v-show="isWx">
    <!--<div v-html="ret"></div>-->
  </div>
</template>

<style lang="scss">
  @import '~assets/stylesheets/main';
  .payother{
    width: 100%;
    background-color: #929292;
    display: flex;
    height: rem(1334px);
    /*background-color: white;*/
    justify-content: center;
    img{
      height: rem(274px);
      width: rem(584px);
      margin-top: rem(45px);
    }
  }
</style>
<script>
  import * as api from '@/api/pay'

  export default {
    data () {
      return {
        ret: ''
      }
    },
    mounted() {
      // this.wxShare()
      this.$loading.hide()
      if (this.isWx === true) {
//        console.log(window.name)
//        if (!window.name) {
//          window.name = 'lijia'
//          document.location.reload()
//        } else {
//        }
      } else {
        api.getpayobject2(JSON.parse(this.$route.query.payitem)).then(function (response) {
          let div = document.createElement('div')
          div.innerHTML = response.data
          document.body.appendChild(div)
          document.forms[0].submit()
        })
      }
    }
  }
</script>
